﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Lucilla.Playground.Website.Extensions
{
    public static class PageExtensions
    {
        public static string Css<T>(this ViewPage<T> page, string fileName)
        {
            return string.Format("<link href=\"{0}\" rel=\"stylesheet\" type=\"text/css\" />", page.ResolveUrl("~/Content/"+fileName+".css"));
        }
        
        public static string Script<T>(this ViewPage<T> page, string fileName)
        {
            return string.Format("<script src=\"{0}\" type=\"text/javascript\"></script>", page.ResolveUrl("~/Scripts/" + fileName + ".js"));
        }
    }
}